#include <iostream>
using namespace std;

class MYCLASS {
public:
	MYCLASS(int min, int max) {
		if (min > max) {
			this->swap(min, max);
		}

		this->min = min;
		this->max = max;
		this->num = 0;
	}

	~MYCLASS() {
	}

	void process();

	void print();

private:
	int min;
	int max;
	int data[200];
	int num;

	void swap(int & v1, int & v2) {
		int t = v1;
		v1 = v2;
		v2 = t;
	}
};

void MYCLASS::process() {
	for (int i = this->min; i <= this->max; i++) {
		if (i % 3 == 0) {
			this->data[this->num] = i;
			this->num++;
		}
	}
}

void MYCLASS::print() {
	for (int i = 0; i < this->num; i++) {
		cout << this->data[i] << "\n";
	}
	cout << endl;
}


int main() {
	MYCLASS mc(10, 1);
	mc.process();
	mc.print();
	return 0;
}